//*****************************************************************************
//
//	.COM Framework
//
//	StlType.h
//
//	version: 1.0
//
//	Date: 03/23/2007
//
//	Copyright (C) 2006-2007 Softg Studio All Rights Reserved.
//	
//	Website: ww.softg.net
//
//	author: xu song seng
//
//*****************************************************************************

#pragma  once

#include <string>
#include <list>
#include <vector>
#include <sstream>
#include <tchar.h>
#include <algorithm>

#ifdef UNICODE
#define TString		std::wstring
#else
#define TString		std::string
#endif

#define WString		std::wstring

namespace std
{
	typedef std::vector<int>		vector_int;
	typedef std::vector<TString>	vector_string;

	template<class _InIt, class _Ty>
	inline void clear_com_object(_InIt _First, _InIt _Last)
	{
		for (; _First != _Last; ++First)
		{
			(*_First)->Release();
		}
	}

	template<class _InIt, class _Ty, class _TyRet>
	inline BOOL find_iter_index(_InIt _First, _InIt _Last, const _Ty& _Val, _TyRet& nIndex)
	{
		for (nIndex = 0; _First != _Last; _First++, nIndex++)
		{
			if (*_First == _Val)
			{
				return TRUE;
			}
		}
		nIndex = 0;
		return FALSE;
	}
}


/*
namespace art
{

template<class _TClass>
class ListVectorPtr : public _TClass
{
	typedef _TClass  baseClass;
	typedef typename _TClass::iterator _MyIterator;
public:
	_MyIterator erase(_MyIterator _Where)
	{
		return _TClass::erase(_Where);
	}
	_MyIterator erase(_MyIterator _First, _MyIterator _Last)
	{
		iterator _Iter = _First;
		baseClass::value_type pItem = NULL;

		while (_Iter != _Last)
		{
			pItem = *_Iter;
			delete pItem;
			_Iter++;
		}

		return _TClass::erase(_First, _Last);
	}
	void clear()
	{
		erase(begin(), end());
	}

	~ListVectorPtr()
	{
		clear();
	}		
};

template<class _TItem>
class VectorPtr : public ListVectorPtr<std::vector<_TItem*> >
{
public:	
protected:
private:
};

template<class _TItem>
class ListPtr : public ListVectorPtr<std::list<_TItem*> >
{
public:	
protected:
private:
};


}; //end namespace std;
*/
